﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Runda.EShop.Test
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
          
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Runda.EShop.Test.WebReference.Order order = new WebReference.Order(System.Configuration.ConfigurationManager.AppSettings["WebUrl"]);

            Runda.EShop.Test.WebReference.OrderDetailPatchWrapperEntity entity = new WebReference.OrderDetailPatchWrapperEntity();

            List<Runda.EShop.Test.WebReference.OrderDetailPatchWrapperEntity> list = new List<WebReference.OrderDetailPatchWrapperEntity>();

            entity.ProductCode = "Axsym样品杯";
            entity.OrderCode = "201211200002";  
            entity.AssignQty = 3;
            entity.BatchCode = "test001";  
            entity.DueDate = DateTime.Now.ToString("yyyy-MM-dd");

            list.Add(entity);

            Runda.EShop.Test.WebReference.OrderSoapHeader header = new Runda.EShop.Test.WebReference.OrderSoapHeader();
            header.UserName = "test";
            header.Password = "test";
            order.OrderSoapHeaderValue = header;


            Runda.EShop.Test.WebReference.OperateResult result = order.InsertOrderDetailPatch(list.ToArray());

            if (result.IsSuccess)
            {
                Label1.Text = result.Message;
            }
            else
                Label1.Text = result.Message;
        }
    }
}